<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/10/14
  Time: 17:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>易买网 - 首页</title>
    <link type="text/css" rel="stylesheet" href="css/style.css"/>
    <script type="text/javascript" src="scripts/function.js"></script>
</head>
<style>
    .table {
        margin: 0 auto;
        width: 900px;
        height: auto;
    }

    #order {
        height: auto;
    }

    .row {
        font-size: 15px;
        width: 100%;
        letter-spacing: 1px;
        height: 80px;
        border: 1px solid #f3f3f3;
    }

    #ordertop {
        width: 900px;
        height: 40px;
    }

    #sum {
        font-size: 24px;
    }

    #name {
        float: left;
        line-height: 80px;
    }

    #num {
        margin-left: 20px;
        line-height: 80px;
    }

    #price {
        margin-left: 20px;
        line-height: 80px;
    }

    #xiaoji {
        float: right;
        line-height: 80px;
    }

    #sum {
        float: right;
        line-height: 80px;
    }

    #ordernumber {
        font-size: 18px;
        float: left;
    }

    #date {
        font-size: 16px;
        float: right;
    }

    #buttons {

        width: 600px;
        margin: 0 auto;
    }

    #cancel, #submit {
        width: 80px;
        height: 30px;
    }

    #cancel {
        margin-left: 200px;
    }

    #submit {

    }

    #cancel:hover {
        background-color: #b1191a;
        cursor: pointer;
    }

    #submit:hover {
        background-color: deepskyblue;
        cursor: pointer;
    }
</style>
<body>
<div id="header" class="wrap">
    <div id="logo"><img src="images/logo.gif"/></div>
    <div class="help"><a href="#" class="shopping">购物车</a><a href="../guestbook.jsp">留言</a><a href='LogOutServlet'>点击注销</a></div>
    <div class="navbar">
        <ul class="clearfix">
            <li class="current"><a href="#">首页</a></li>
            <li><a href="#">图书</a></li>
            <li><a href="#">百货</a></li>
            <li><a href="#">品牌</a></li>
            <li><a href="#">促销</a></li>
        </ul>
    </div>
</div>
<div id="childNav">
    <div class="wrap">
        <ul class="clearfix">
            <li class="first"><a href="#">音乐</a></li>
            <li><a href="#">影视</a></li>
            <li><a href="#">少儿</a></li>
            <li><a href="#">动漫</a></li>
            <li><a href="#">小说</a></li>
            <li><a href="#">外语</a></li>
            <li><a href="#">数码相机</a></li>
            <li><a href="#">笔记本</a></li>
            <li><a href="#">羽绒服</a></li>
            <li><a href="#">秋冬靴</a></li>
            <li><a href="#">运动鞋</a></li>
            <li><a href="#">美容护肤</a></li>
            <li><a href="#">家纺用品</a></li>
            <li><a href="#">婴幼奶粉</a></li>
            <li><a href="#">饰品</a></li>
            <li class="last"><a href="#">Investor Relations</a></li>
        </ul>
    </div>
</div>
<div id="position" class="wrap">
    您现在的位置：<a href="../index.html">易买网</a> &gt; 购物车
</div>
<div class="wrap">
    <div id="shopping">
        <div class="shadow">
            <em class="corner lb"></em>
            <em class="corner rt"></em>
        </div>
        <form action="/shopping/OrderPayServlet" method="post">
            <div id="order">
                <ul class="table">
                    <div id="ordertop"><b id="ordernumber">订单号：${sessionScope.fatherOrder.fatherorderid}</b><span
                            id="date">创建时间:<fmt:formatDate
                            value="${sessionScope.fatherOrder.createtime}"
                            pattern="yyyy年MM月dd日 HH时mm分ss秒"/> </span></div>
                    <c:forEach items="${sessionScope.sonOrderList}" var="s">
                        <c:forEach items="${sessionScope.productList}" var="p">
                            <c:if test="${p.productid==s.com_id}">
                                <li class="row">
                                    <span id="name">商品:${p.productname} </span>
                                    <span id="num">数量:${s.num} 个</span>
                                    <span id="price">单价：${s.price}元</span>
                                    <span id="xiaoji">小计:${s.sonordersum}元</span>
                                </li>
                            </c:if>
                        </c:forEach>
                    </c:forEach>
                    <li><span id="sum">总计：${sessionScope.fatherOrder.sum}元</span></li>
                </ul>
                <div id="buttons"><input type="submit" id="cancel" value="取消">
                    <input type="hidden" name="out_trade_no" value="${sessionScope.fatherOrder.fatherorderid}">
                    <input type="hidden" name="total_amount" value="${sessionScope.fatherOrder.sum}"/>
                    <input type="submit" id="submit" value="确认订单"></div>
            </div>
        </form>
    </div>
</div>
<div id="footer">
    Copyright &copy; 2010 北大青鸟 All Rights Reserved. 京ICP证1000001号
</div>
</body>
</html>

